#include<iostream>
#include<vector>
#include<string>
#include<cstring>
using namespace std;
const int N = 110;
char a[N][N];
string s;
vector<string> f;
int main()
{
    int n; cin >> n;
    cin >> ws;
    getline(cin, s);
    int m = 0; int i = 0;
    for (i = 0; m < s.size(); i++)
    {
        for (int j = 0; j < n; j++)
        {
            a[i][j] = s[m++];
        }
    }
    // 现在开始逆转
    for(int y = 0; y < n; y++)
    {
        string tmp;
        for (int x = i - 1; x >= 0; x--)
        {
            tmp += (a[x][y] == 0 ? ' ' : a[x][y]);
        }
        f.emplace_back(tmp);
    }
    for (auto& x : f)
    {
        cout << x << endl;
    }
    return 0;
}